# $Id: Makefile,v 1.00 2009/01/18 12:30:00 AL $
CC = g++
PROG = elsass
#CPP_SOURCES = serialization.cpp sensorlevels.cpp info.cpp infoid.cpp infoset.cpp world.cpp elsassGUI.cpp elsass.cpp
CPP_SOURCES = serialization.cpp sensorlevels.cpp info.cpp infoid.cpp infoset.cpp entity.cpp
C_SOURCES =
SOURCES = $(CPP_SOURCES) $(C_SOURCES)
CFLAGS = -g -Wall -O2 `pkg-config --cflags clanCore-0.8 clanDisplay-0.8 clanSound-0.8 clanApp-0.8 clanGL-0.8 clanMikMod-0.8` -I/usr/local/include/Box2D/Include
LIBS =  `pkg-config --libs clanCore-0.8 clanDisplay-0.8 clanSound-0.8 clanApp-0.8 clanGL-0.8 clanMikMod-0.8` -lbox2d
LDFLAGS = -g -Wall

CPP_OBJECTS = $(patsubst %.cpp,%.o,$(CPP_SOURCES))
C_OBJECTS = $(patsubst %.c,%.o,$(C_SOURCES))
OBJECTS = $(CPP_OBJECTS) $(C_OBJECTS)

all: $(PROG) $(OBJECTS)


.c.o :
	$(CC) $(CFLAGS) -c $*.c -o $@

.cpp.o :
	$(CC) $(CFLAGS) -c $*.cpp -o $@

$(PROG): $(OBJECTS)
	$(CC) $(LDFLAGS) $(CPP_OBJECTS) $(C_OBJECTS) -o $(PROG) $(LIBS)

clean:
	rm -f $(OBJECTS) $(PROG)

depend:
	makedepend -- $(CFLAGS) -- $(SOURCES)

# DO NOT DELETE

serialization.o: serialization.h
sensorlevels.o: sensorlevels.h
info.o: info.h infoid.h entityid.h sensorlevels.h serialization.h
infoid.o: infoid.h
infoset.o: infoset.h info.h infoid.h entityid.h sensorlevels.h
infoset.o: serialization.h
entity.o: entity.h infoset.h info.h infoid.h entityid.h sensorlevels.h
entity.o: serialization.h
